package cn.edu.scau.cmi.wusonglang.simpleFactory;

public class SimpleFactory {
	
	static InsuranceClaims policy = null;
	
	public static InsuranceClaims InsuranceClaimsfactory(String typeOfInsurance) {
		switch(typeOfInsurance) {
		case "bodyInjure":policy = new BodyInjure();break;
		case "collision":policy = new Collision();break;
		case "com":policy = new Com();break;
		case "personInjure":policy = new PersonInjure();break;
		}
		return policy;
	}
}
